package com.ustadzmenjawab.client;

import java.util.List;
import java.util.TreeMap;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.ustadzmenjawab.shared.Article;
import com.ustadzmenjawab.shared.SearchResult;
import com.ustadzmenjawab.shared.WebsiteSource;

@RemoteServiceRelativePath("appcontrol")
public interface AppControlService extends RemoteService{
	void addNewArticle(Article article);
	
	List<SearchResult> searchKeyword(String keyword);
	List<SearchResult> searchKeyword(String keyword,String source);
	List<SearchResult> searchKeyword(String keyword, int start, int size);
	List<SearchResult> searchKeyword(String keyword,String source, int start, int size);
	List<String> getSourcesForResult(String keyword);
	int getTotalCount(String keyword);
	int getTotalCountForSource(String keyword, String source);
	String getQuestion(int id);
	void updateVisit(String url);
	List<SearchResult> searchSimilarQuestion(String keyword, int qid);
	List<SearchResult> searchSimilarQuestion(String keyword,int qid, int start, int size);
	int getCountSimilarResult(int qid);
	String getPage(String pageName);
	List<WebsiteSource> getSourceList();
	String getSpellSuggestion(String query);
}
